package day4;

/**
 * @author oldliu
 * @since 1.0
 */
public class StrTest {
    public static void main(String[] args) {
        String str="大扎好，我喜欢java";





        String s2=new String(str);
        byte[]b={65,66,67,-26, -84, -94};
        String s3=new String(b);
        System.out.println(s3);
        char []cr={97,21016};
        String s4=new String(cr);
        System.out.println(s4);
        System.out.println(">>>>>>>>>>>不变性");

        String s6=str;
        str=str.toUpperCase();
        System.out.println(str);
        System.out.println("s6："+s6);
        //String s5=str.toUpperCase();
        System.out.println(str);
        ///System.out.println(s5);
        System.out.println(s6.equals(str));

        System.out.println("忽略大小写的比较："+s6.equalsIgnoreCase(str));

        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>");
        String s7="小老虎";
        String s8="小老虎";
        String s9="老虎";
        s9="小"+s9;
        System.out.println(s7==s8);

        System.out.println(s7==s9);

        s7=s7.concat("Tiger");
        System.out.println("s7="+s7);
        System.out.println("s7长度："+s7.length());
    }
}
